namespace Beauty.Net.Consul.Core;

/// <summary>
/// Consul配置选项
/// </summary>
public class ConsulOptions
{
    /// <summary>
    /// 是否启用Consul
    /// </summary>
    public bool Enabled { get; set; } = true;
    
    /// <summary>
    /// Consul服务器地址
    /// </summary>
    public string Address { get; set; } = "http://localhost:8500";
    
    /// <summary>
    /// 服务名称
    /// </summary>
    public string ServiceName { get; set; } = "Beauty.NetWebApi";
    
    /// <summary>
    /// 服务ID
    /// </summary>
    public string ServiceId { get; set; } = $"Beauty.NetWebApi-{Guid.NewGuid():N}";
    
    /// <summary>
    /// 服务地址
    /// </summary>
    public string ServiceAddress { get; set; } = string.Empty;
    
    /// <summary>
    /// 服务端口
    /// </summary>
    public int ServicePort { get; set; } = 5000;
    
    /// <summary>
    /// 健康检查地址
    /// </summary>
    public string HealthCheckAddress { get; set; } = "/health";
    
    /// <summary>
    /// 健康检查间隔（秒）
    /// </summary>
    public int HealthCheckInterval { get; set; } = 10;
    
    /// <summary>
    /// 健康检查超时（秒）
    /// </summary>
    public int HealthCheckTimeout { get; set; } = 5;
    
    /// <summary>
    /// 服务标签
    /// </summary>
    public List<string> Tags { get; set; } = new List<string>();
    
    /// <summary>
    /// 是否启用服务注册
    /// </summary>
    public bool EnableRegistration { get; set; } = true;
    
    /// <summary>
    /// 是否启用DNS服务
    /// </summary>
    public bool EnableDns { get; set; } = false;
    
    /// <summary>
    /// Consul访问令牌
    /// </summary>
    public string Token { get; set; } = string.Empty;
    
    /// <summary>
    /// Consul命名空间
    /// </summary>
    public string Namespace { get; set; } = string.Empty;
    
    /// <summary>
    /// 是否启用健康检查
    /// </summary>
    public bool EnableHealthCheck { get; set; } = true;
}